package database;

import java.util.Vector;

import processing.core.PApplet;
import processing.core.PFont;
import processing.core.PImage;
import TUIO.*;


public class Album {
	
	// members
	private String title;
	private String artist;
	private Vector<String> tracks;
	private PImage pimage;
	
	DBConnector parent;
	
	// for drag 'n drop
	TuioPoint lastPoint;
	public TuioPoint getLastPoint() {
		return lastPoint;
	}

	public void setLastPoint(TuioPoint lastPoint) {
		this.lastPoint = lastPoint;
	}

	float offsetX;
	float offsetY;
	boolean objMoving;
	int cursorId;
	
	public int getCursorId() {
		return cursorId;
	}

	public void setCursorId(int cursorId) {
		this.cursorId = cursorId;
	}

	//////////////////////////
	public Album(DBConnector parent){
		this.parent = parent;
		offsetX = 0;
		offsetY = 0;
		objMoving = false;
		lastPoint = new TuioPoint(0,0);
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getArtist() {
		return artist;
	}

	public void setArtist(String artist) {
		this.artist = artist;
	}

	public Vector<String> getTracks() {
		return tracks;
	}

	public void setTracks(Vector<String> tracks) {
		this.tracks = tracks;
	}

	public PImage getImage() {
		return pimage;
	}

	public void setImage(String imageURI) {
		//this.pimage = new PImage();
		this.pimage = this.parent.getParent().loadImage(imageURI);
		this.pimage.resize(30, 30);
	}

	public float getOffsetX() {
		return offsetX;
	}

	public void setOffsetX(float offsetX) {
		this.offsetX = offsetX;
	}

	public float getOffsetY() {
		return offsetY;
	}

	public void setOffsetY(float offsetY) {
		this.offsetY = offsetY;
	}

	public boolean isObjMoving() {
		return objMoving;
	}

	public void setObjMoving(boolean objMoving) {
		this.objMoving = objMoving;
	}
	
}
